package cn.tedu.dimanage.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Classname: ItemDetailVO
 * @Author: bromide
 * @CreateTime: 2022/6/19--下午8:55
 * @Version: V1.0
 * @Description:
 */
@Data
public class ItemDetailVO implements Serializable {
    private Long id;

    @NotNull(message = "请提交物资名称!")
    private String name;

    private String img;

    @NotNull(message = "请提交物资描述!")
    private String description;

   @NotNull(message = "请提交库存数量!")
   @Max(value = 1200000,message = "无效的库存数量,请重新输入!")
   @Min(value = 0,message = "无效的库存数量,请重新输入!")
    private Integer inventory;

    private String requireApplication;
    private Integer isEnable;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm:ss", timezone="GMT+8")
    private LocalDateTime itemCreate;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm:ss", timezone="GMT+8")
    private LocalDateTime itemModified;
}
